<template>
  <div>
    子组件
  </div>
  <Suspense>
    <template v-slot:default>
      <Grandson/>
    </template>
    <template v-slot:fallback>
      <h3>加载中..</h3>
    </template>
  </Suspense>
</template>

<script>
import {defineAsyncComponent} from 'vue'
const Grandson=defineAsyncComponent(()=>import('./Grandson.vue'))
  export default {
    name:'Son',
    components: {
      Grandson,
    },
  }
</script>

<style lang="less" scoped>
div{
  color: #000;
}
</style>